# Maintainer: Jelle van der Waa <jelle@vdwaa.nl>
# Contributor: Marcin (CTRL) Wieczorek <marcin@marcin.co>
# Contributor: Marcin Kornat <rarvolt+aur@gmail.com>
# Contributor: MatejSpindler <spindler.matej@gmail.com>

pkgname=esptool
pkgver=4.5.1
pkgrel=2
pkgdesc="A cute Python utility to communicate with the ROM bootloader in Espressif ESP8266"
arch=('any')
url="https://github.com/espressif/esptool"
license=('GPL2')
makedepends=('git' 'python-setuptools')
depends=('python-pyserial' 'python-ecdsa' 'python-pyaes' 'python-bitstring' 'python-reedsolo' 'python-cryptography')
source=($pkgname-$pkgver.tar.gz::https://github.com/espressif/esptool/archive/v${pkgver}.tar.gz)
sha512sums=('4b665018eb38796cf785ba0caa20435a1bfa5ad5a50f57207d84242307d354405224ccf216b2cfd8b72602d1f04caa4af38feedc7eb7d8984a1e9e308f8789c4')

build() {
  cd "${pkgname}-${pkgver}"
  python3 setup.py build
}

package() {
  cd "${pkgname}-${pkgver}"
  python3 setup.py install --root="$pkgdir/" --optimize=1 --skip-build
}
